﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Downloader.Domain;
using Downloader.Domain.Contracts.Tasks;
using SharpArch.Domain.PersistenceSupport;

namespace Downloader.Tasks
{
    public class UserAccountTasks : IUserAccountTasks
    {
        public IRepository<UserAccount> Repository { get; set; }

        public UserAccount SaveOrUpdate(UserAccount userAccount)
        {
            return Repository.SaveOrUpdate(userAccount);
        }

        public void Delete(int id)
        {
            var entity = Repository.Get(id);
            this.Repository.Delete(entity);
        }
    }
}
